package cn.stylefeng.guns.modular.hx.storage.mapper;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.modular.hx.order.model.params.HxOrderOutParam;
import cn.stylefeng.guns.modular.hx.order.model.result.HxOrderOutResult;
import cn.stylefeng.guns.modular.hx.storage.entity.HxStorageOut;
import cn.stylefeng.guns.modular.hx.storage.model.params.HxStorageOutParam;
import cn.stylefeng.guns.modular.hx.storage.model.params.HxStoragePutDetailedParam;
import cn.stylefeng.guns.modular.hx.storage.model.result.*;
import cn.stylefeng.guns.modular.hx.storage.model.params.HxStoragePutParam;
import cn.stylefeng.guns.modular.hx.storage.model.result.HxStorageOutResult;
import cn.stylefeng.guns.modular.hx.storage.model.result.HxStoragePutDetailedResult;
import cn.stylefeng.guns.modular.hx.storage.model.result.HxStoragePutResult;
import cn.stylefeng.guns.modular.rest.agv.vo.StorageOutCntOby;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 拣货单表 Mapper 接口
 * </p>
 *
 * @author zhucx
 * @since 2023-09-05
 */
public interface HxStorageOutMapper extends BaseMapper<HxStorageOut> {

    /**
     * 获取列表
     *
     * @author zhucx
     * @Date 2023-09-05
     */
    List<HxStorageOutResult> customList(@Param("paramCondition") HxStorageOutParam paramCondition);

    List<HxStorageOutResult> query(@Param("paramCondition") HxStorageOutParam paramCondition);

    List<HxStorageOutResult> queryByGetUnitId(@Param("getUnitId") Long getUnitId);

    /**
     * 获取map列表
     *
     * @author zhucx
     * @Date 2023-09-05
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") HxStorageOutParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author zhucx
     * @Date 2023-09-05
     */
    Page<HxStorageOutResult> customPageList(@Param("page") Page page, @Param("paramCondition") HxStorageOutParam paramCondition, @Param("condition") String condition, @Param("operateId")Long operateId);

    Page<HxStorageOutResult> findAppDailingquPageBySpec(@Param("page") Page page, @Param("paramCondition") HxStorageOutParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author zhucx
     * @Date 2023-09-05
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") HxStorageOutParam paramCondition);

    List<GoodNumVo> getGoodNumByHxStorageOut(@Param("paramCondition")HxStorageOutParam param);

    List<GoodNumVo> getGoodStockNum(@Param("paramCondition")HxStorageOutParam param);



	HxStorageOut findByThelastone();

	boolean saveBatchList(@Param("list")List<HxStorageOutParam> list);

	List<HxStorageOutResult> findAppDailingquBySpec(@Param("paramCondition")HxStorageOutParam param);

	List<HxStorageOutResult> findAppYilingquBySpec(@Param("paramCondition")HxStorageOutParam param);

	HxStorageOutResult findSumBySpec(@Param("paramCondition")HxStorageOutParam param);

    HxStorageOutResult lockBySpec(@Param("paramCondition")HxStorageOutParam param);

	HxStorageOutResult findBySpec(@Param("paramCondition")HxStorageOutParam param);

    Page<HxStorageOutResult> findAppDailingquzhijianPageBySpec(@Param("page") Page page, @Param("paramCondition") HxStorageOutParam paramCondition);

    List<HxStorageOutResult> appfindyilingquzhijian(@Param("paramCondition")HxStorageOutParam param);


    HxStorageOutResult getPrintStorageOut(@Param("paramCondition")HxStorageOutParam param);

    Page<HxStorageOutResult> getPrintStorageuser(@Param("page") Page page,@Param("paramCondition")HxStorageOutParam hxStorageOutParam, @Param("condition") String condition);


    Page<HxStorageOutResult> getPrintQualityuser(@Param("page")Page pageContext, @Param("paramCondition")HxStorageOutParam hxStorageOutParam,@Param("condition")  String condition);
    void updatePrint(@Param("paramCondition")HxStorageOutParam param);


    Long findByStorageNumber(@Param("storageNumber")String storageNumber);

    HxStorageOutResult findReceivingBySpec(@Param("paramCondition")HxStorageOutParam hxStorageOutParam);

    List<HxStorageOutResult> findReceivingBySpecOwn(@Param("paramCondition")HxStorageOutParam hxStorageOutParam);

    List<HxStorageOutResult> details(@Param("paramCondition")HxStorageOutParam hxStorageOutParam);

    HxStorageOutResult findcheckBySpec(@Param("paramCondition")HxStorageOutParam hxStorageOutParam1);
    List<datavProResult> find(@Param("paramCondition")datavProResult datavProResult);

    List<storeProResult> find1(@Param("paramCondition")storeProResult  storeProResult);

    List<chukuPositionResult> findchukuposition(@Param("paramCondition")chukuPositionResult chukuPositionResult);

    List<HxStorageOutResult> findJjianhuoData(@Param("paramCondition")HxStorageOutResult hxStorageOutResult);

    List<HxStorageOutResult> findZhijianData(@Param("paramCondition")HxStorageOutResult hxStorageOutResult);

    List<HxStorageOutResult> findDdPretendCarData(@Param("paramCondition")HxStorageOutResult hxStorageOutResult);

	List<HxStorageOutResult> findPrePickOrder(@Param("getUnit_ids")List<Long> getUnit_ids);
    List<HxStorageOutResult> findzuoye(@Param("paramCondition")HxStorageOutResult hxStorageOutResult);

    List<chukuPositionResult> findjihuoliang(@Param("paramCondition")chukuPositionResult chukuPositionResult);


    void updatePrint2(@Param("paramCondition")HxStorageOutParam param);

    void updateByStokPort(@Param("paramCondition")HxStorageOutParam param);

    List<HxStorageOutResult> findlistAllBySpec(@Param("paramCondition")HxStorageOutParam hxStorageOutParam, @Param("condition")String condition, @Param("operateId")Long operateId);

    List<HxStorageOutResult> findlistAllBySpec2(@Param("paramCondition")HxStorageOutParam hxStorageOutParam, @Param("condition")String condition, @Param("operateId")Long operateId);

    HxStorageOutResult count(@Param("paramCondition")HxStorageOutParam hxStorageOutParam, @Param("condition")String condition, @Param("operateId")Long operateId);

    HxStorageOutResult count2(@Param("paramCondition")HxStorageOutParam hxStorageOutParam, @Param("condition")String condition, @Param("operateId")Long operateId);

    List<HxStorageOutResult> getPrintStorageuserConts(@Param("paramCondition")HxStorageOutParam hxStorageOutParam, @Param("condition") String condition);

	HxStorageOutResult findCountGoodsBySpec(@Param("paramCondition")HxStorageOutParam hxStorageOutParam);


    Page<HxStorageOutResult> customPageList2(@Param("page") Page page, @Param("paramCondition") HxStorageOutParam paramCondition, @Param("condition") String condition, @Param("operateId")Long operateId);

    String checkCustomerStorage(String storageNumber);


    void updateSum(String storageNumber);

	List<HxStorageOutResult> findAppAgvYilingquBySpec(@Param("paramCondition")HxStorageOutParam param);

	HxStorageOutResult findAppAgvYilingquBySpecJs(@Param("paramCondition")HxStorageOutParam hxStorageOutParam);

    List<StorageOutCntOby> areaStorageOutCntList(@Param("paramCondition") HxStorageOutParam hxStorageOutParam);


    List<HxStorageOutResult> expExcel(@Param("paramCondition") HxStorageOutParam paramCondition, @Param("condition") String condition, @Param("operateId")Long operateId);
}
